home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
print
/
gs261ini.zip
/
LANGUAGE.DOC
< prev
next >
Wrap
Text File
|
1993-05-27
|
16KB
|
421 lines
Copyright (C) 1989-1992 Aladdin Enterprises. All rights reserved.
This file is part of Ghostscript.
Ghostscript is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing. Refer
to the Ghostscript General Public License for full details.
Everyone is granted permission to copy, modify and redistribute
Ghostscript, but only under the conditions described in the Ghostscript
General Public License. A copy of this license is supposed to have been
given to you along with Ghostscript so you can know your rights and
responsibilities. It should be in a file named COPYING. Among other
things, the copyright notice and this notice must be preserved on all
copies.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This file, language.doc, describes the Ghostscript language.
For an overview of Ghostscript and a list of the documentation files, see
README.
The Ghostscript interpreter, except as noted below, is intended to execute
properly any source program written in a language defined by reference to
the December 1990 printing of the PostScript Language Reference Manual
(Second Edition) published by Addison-Wesley (ISBN 0-201-18127-4). The
Ghostscript language includes the following elements of the PostScript
(TM) language:
- The full PostScript Level 1 language, as also defined in the
first edition of the PostScript Language Reference Manual, ISBN
0-201-10174-2, Addison-Wesley, 1985.
- The CMYK color, file system, version 25.0 language, and
miscellaneous additions listed in sections A.1.4, A.1.6, A.1.7, and
A.1.8 of the Second Edition respectively, including allowing a string
operand for the 'status' operator;
- The Display PostScript extensions listed in section A.1.3
of the Second Edition, but excluding the operators listed in section
A.1.2. These facilities are only available if the dps feature or the
level2 feature was selected at the time that Ghostscript was compiled
and linked.
- The composite font extensions listed in section A.1.5 of
the Second Edition, but not the ability to handle Type 0 fonts.
These facilities are only available if the compfont feature or the
level2 feature was selected at the time that Ghostscript was compiled
and linked.
- A subset of the other PostScript Level 2 operators and
facilities listed in section A.1.1 of the Second Edition, identified
below. These facilities are only available if the level2 feature was
selected at the time that Ghostscript was compiled and linked.
Ghostscript also includes a number of operators defined below that are not
in the PostScript language.
Stub facilities
---------------
The following operators, while provided in the current release, have only
a partial or dummy implementation.
Form and pattern operators:
execform
Graphics state operators:
currentblackgeneration, currentcolorscreen,
currenthalftonephase, currentundercolorremoval,
setblackgeneration, setcolorscreen,
sethalftonephase, setundercolorremoval,
currenthalftone, sethalftone
Interpreter parameter operators:
currentsystemparams, currentuserparams
setsystemparams, setucacheparams, setuserparams
ucachestatus
Path construction operators:
ucache
Virtual memory operators:
currentshared, scheck, setshared, setvmthreshold, shareddict,
SharedFontDirectory, vmreclaim
Miscellaneous operators:
serialnumber
Unclassified Level 2 operators
------------------------------
Ghostscript provides the following PostScript Level 2 operators
listed in section A.1.1 of the Second Edition and not listed in any
of the other A.1 sections.
File operators:
filter (all but DCTEncode/Decode)
Resource operators:
defineresource, findresource, resourceforall, resourcestatus,
undefineresource
Character and font operators:
cshow, xshow, yshow, xyshow
glyphshow
findencoding, rootfont, setcachedevice2
(WMode is supported, but composite fonts are not)
Graphics state operators:
currentcolor, currentcolorspace, setcolor, setcolorspace
(except for Indexed with procedure, true Separation, and Pattern)
currentcolorrendering, setcolorrendering
Miscellaneous operators:
languagelevel
In addition, Ghostscript supports the following Level 2 facilities:
- Use of a dictionary with the image and imagemask operators;
- Use of a string or a file as data source with the image,
imagemask, and colorimage operators.
When the Level 2 features are present, Ghostscript also supports the
following operator:
<1 or 2> .setlanguagelevel -
Set the current language level to Level 1 or Level 2.
When the language level is 1, no Level 2 facilities
are provided.
Unimplemented Level 2 facilities
--------------------------------
Ghostscript currently does not implement the following Level 2
operators and variables:
currentdevparams, setdevparams
GlobalFontDirectory
makepattern
realtime
currentpagedevice, setpagedevice
startjob
Ghostscript currently does not implement the following Level 2
facilities not enumerated above:
garbage collection
global and local VM
page devices
job control
halftone dictionaries
user names
Ghostscript-specific additions
==============================
Miscellaneous
-------------
^Z is counted as whitespace.
run can take either a string or a file as its argument. In the former
case, it uses findlibfile to open the file (searching directories as
needed). In the latter case, it just runs the file, closing it at the
end, and trapping errors just as for the string case.
Mathematical operators
----------------------
<number> arccos <number>
Computes the arc cosine of a number between -1 and 1.
<number> arcsin <number>
Computes the arc sine of a number between -1 and 1.
String operators
----------------
<state> <fromString> <toString> type1encrypt <newState> <toSubstring>
Encrypts fromString according to the algorithm for Adobe
Type 1 fonts, writing the result into toString.
toString must be at least as long as fromString or a
rangecheck error occurs. state is the initial state of
the encryption algorithm (a 16-bit non-negative
integer); newState is the new state of the algorithm.
<state> <fromString> <toString> type1decrypt <newState> <toSubstring>
Decrypts fromString according to the algorithm for Adobe
Type 1 fonts, writing the result into toString. Other
specifications are as for type1encrypt.
Relational operators
--------------------
<number|string> <number|string> max <number|string>
Returns the larger of two numbers or strings.
<number|string> <number|string> min <number|string>
Returns the smaller of two numbers or strings.
File operators
--------------
<string> findlibfile <foundstring> <file> true or <string> false
Opens the file of the given name for reading. If the file
cannot be opened using the supplied name, searches
through directories as described in use.doc. If the
search fails, findlibfile simply pushes false on the
stack and returns, rather than causing an error.
<file> <integer> unread -
Pushes back the last-read character onto the front of the
file. If the file is only open for writing, or if the
integer argument is not the same as the last character
read from the file, causes an ioerror error. May also
cause an ioerror if the last operation on the file was not
a reading operation.
<file> <device> writeppmfile -
Writes the contents of the device, which must be an image
device, onto the file, in Portable PixMap (ppm) format.
Does not close the file.
Path operators
--------------
<x> <y> <width> <height> rectappend -
<numarray> rectappend -
<numstring> rectappend -
Appends a rectangle or rectangles to the current path, in
the same manner as rectfill, rectclip, etc. Onl